Starting from the copper-oxygen Hamiltonian of the CuO2 planes, we derive analytically an extended 1-band Hubbard Hamiltonian for the electrons on copper sites, through a canonical transformation which eliminates the oxygen sites. The model sustains a variety of phases : checkerboard states, stripes, antiferromagnetism, local pairs and mixtures thereof. This approach may be helpful in understanding what is so special about the CuO2 planes, as opposed to other compounds.